/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package mundo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author USUARIO WINDOWS
 */
@Embeddable
public class DetalleVentaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idDetalleVenta")
    private int idDetalleVenta;
    @Basic(optional = false)
    @Column(name = "idVenta")
    private int idVenta;

    public DetalleVentaPK() {
    }

    public DetalleVentaPK(int idDetalleVenta, int idVenta) {
        this.idDetalleVenta = idDetalleVenta;
        this.idVenta = idVenta;
    }

    public int getIdDetalleVenta() {
        return idDetalleVenta;
    }

    public void setIdDetalleVenta(int idDetalleVenta) {
        this.idDetalleVenta = idDetalleVenta;
    }

    public int getIdVenta() {
        return idVenta;
    }

    public void setIdVenta(int idVenta) {
        this.idVenta = idVenta;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idDetalleVenta;
        hash += (int) idVenta;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DetalleVentaPK)) {
            return false;
        }
        DetalleVentaPK other = (DetalleVentaPK) object;
        if (this.idDetalleVenta != other.idDetalleVenta) {
            return false;
        }
        if (this.idVenta != other.idVenta) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "mundo.DetalleVentaPK[ idDetalleVenta=" + idDetalleVenta + ", idVenta=" + idVenta + " ]";
    }
    
}
